<template>

  <ul class="collection">
    <li class="collection-item">
      <h4 class="collection-header"><a route-href="route.bind:'pool'; params.bind:{id: pool.id}">${pool.id}</a> -
        ${pool.coin.type}</h4>
      <p>Fee: ${pool.poolFeePercent}%</p>
    </li>
    <li class="collection-item">
      <div class="row">
        <div class="col s12 m6 ">
          Pool Address
        </div>
        <a href.bind="pool.addressInfoLink" target="_blank" class="col  s12 m6 truncate">
          ${pool.address}
        </a>
      </div>
    </li>
    <li class="collection-item">
      <div class="row">
        <div class="col s12 m6 ">
          Pool Payout Minimum Balance:
        </div>
        <a href.bind="pool.addressInfoLink" target="_blank" class="col  s12 m6 truncate">
          ${pool.paymentProcessing.minimumPayment}
        </a>
      </div>
    </li>
    <li class="collection-item">
      <div class="row">
        <div class="col  s12 m6 ">
          Pool Stats
        </div>
        <div class="col  s12 m6 ">
          <ul>
            <li>Miners: ${pool.poolStats.connectedMiners}</li>
            <li>Hashrate: ${HashCalculatorService.formatHashRate(pool.poolStats.poolHashRate*2)}</li>
            <li>Valid Shares Per Second: ${pool.poolStats.validSharesPerSecond}</li>
          </ul>
        </div>
      </div>
    </li>
    <li class="collection-item">
      <div class="row">
        <div class="col  s12 m6 ">
          Network Stats
        </div>
        <div class="col  s12 m6 ">
          <ul>
            <li>Current Block: ${pool.networkStats.blockHeight}</li>
            <li>Peers: ${pool.networkStats.connectedPeers}</li>
            <li>Network Difficulty ${HashCalculatorService.formatDifficulty(pool.networkStats.networkDifficulty)}
            </li>
            <li>Network Hashrate ${HashCalculatorService.formatHashRate(pool.networkStats.networkHashRate)}</li>
          </ul>
        </div>
      </div>
    </li>
    <li class="collection-item row" repeat.for="port of pool.ports | objectKeys">
      <div class="col  s12 m6 "><code>-o stratum+tcp://${baseUrl}:${port} -u &gtWALLET_ADDRESS&lt</code>
      </div>
      <div class="col  s12 m6 ">
        <p class="collections-title">Difficulty ${pool.ports[port].difficulty} </p>
        <p class="collections-content">
        <ul if.bind="pool.ports[port].varDiff">
          <li>Difficulty also variates </li>
          <li>[Min Diff: ${pool.ports[port].varDiff.minDiff} Variance: ${pool.ports[port].varDiff.variancePercent}%]
          </li>
        </ul>
        </p>
      </div>
    </li>
  </ul>

</template>
